<%@ page import="com.kgc.web.listener.OnLineListener" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/3/8
  Time: 13:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户1</title>
</head>
<body>
<%
    String user1="张三";
    if(session.getAttribute("user1")==null){
        session.setAttribute("user1", new OnLineListener(user1));
    }

    Object total = application.getAttribute("total");

    out.println("当前用户:"+user1+"<br>在线人数："+total);
%>
<br>
<a href="index.jsp?user=user1">移除当前用户</a>
<br/>
<a href="index.jsp">回到首页</a>

</body>
</html>
